﻿<phone:PhoneApplicationPage 
    xmlns:local="clr-namespace:MidimediaFinder"
    local:TiltEffect.IsTiltEnabled="True"
    x:Class="MidimediaFinder.ResultsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Name="PivotControl" Title="{Binding Path=Strings.Title, Source={StaticResource LocalizedStrings }}">

            <controls:PivotItem Name="Pivot_Promotions" Header="{Binding Path=Strings.Promotions, Source={StaticResource LocalizedStrings }}">
                <!--Triple line list no text wrapping-->
                <ListBox x:Name="Promotions_List" Margin="0,0,-12,0" ItemsSource="{Binding Promotions}" SelectionMode="Single" Grid.Row="0" SelectionChanged="Promotions_List_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17">
                                <Image Source="{Binding _ImageUrl}" Width="60" Height="60" Margin="60,0,0,0" HorizontalAlignment="Left" />
                                <TextBlock Text="{Binding _Name}" TextWrapping="NoWrap" Margin="150,-70,0,0" Width="300" Style="{StaticResource PhoneTextLargeStyle}"/>
                                <TextBlock Text="{Binding _Distance}" TextWrapping="Wrap" Margin="150,-25,0,0" Width="300" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                <TextBlock Text="{Binding _Hint}" TextWrapping="Wrap" Margin="150,0,0,0" Width="300" Style="{StaticResource PhoneTextSubtleStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>

            <controls:PivotItem Name="Pivot_Items" Header="">
                <Grid>

                    <!--<phone:WebBrowser HorizontalAlignment="Left" Name="webBrowser_History" VerticalAlignment="Top" Height="424" Width="454" Visibility="Collapsed" />-->
                    <ListBox x:Name="Items_List" Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionMode="Single" Grid.Row="0" SelectionChanged="Items_List_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="0,0,0,17">
                                    <Image Source="{Binding _ImageUrl}" Width="60" Height="60" Margin="60,0,0,0" HorizontalAlignment="Left" />
                                    <TextBlock Text="{Binding _Name}" TextWrapping="NoWrap" Margin="150,-70,0,0" Width="300" Style="{StaticResource PhoneTextLargeStyle}"/>
                                    <TextBlock Text="{Binding _Distance}" TextWrapping="Wrap" Margin="150,-25,0,0" Width="300" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                    <Image Source="{Binding _Star1}" Width="25" Height="25" Margin="150,10,0,0" HorizontalAlignment="Left" />
                                    <Image Source="{Binding _Star2}" Width="25" Height="25" Margin="180,-25,0,0" HorizontalAlignment="Left" />
                                    <Image Source="{Binding _Star3}" Width="25" Height="25" Margin="210,-25,0,0" HorizontalAlignment="Left" />
                                    <Image Source="{Binding _Star4}" Width="25" Height="25" Margin="240,-25,0,0" HorizontalAlignment="Left" />
                                    <Image Source="{Binding _Star5}" Width="25" Height="25" Margin="270,-25,0,0" HorizontalAlignment="Left" />
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                </Grid>
            </controls:PivotItem>

           
        </controls:Pivot>
    </Grid>

</phone:PhoneApplicationPage>